package net.findkrypton.entity;

import javafx.scene.canvas.GraphicsContext;
import javafx.scene.image.Image;
import net.findkrypton.enume.CenterButtonState;
import net.jumpengine.bean.ClickBase;

public class ImageState extends ClickBase {
	private Image[] images;
	private CenterButtonState state=CenterButtonState.nomal;

	public ImageState(int x, int y, int width, int height,Image[] images) {
		this(x, y, width, height,0,images);
	}
	public ImageState(int x, int y, int width, int height, int index,Image[] images) {
		super(x, y, width, height, index);
		this.images=images;
	}

	@Override
	public void draw(GraphicsContext g) {
		g.drawImage(images[state.val()], x, y);
	}
	
	public CenterButtonState getState() {
		return state;
	}
	public void setState(CenterButtonState state) {
		this.state = state;
	}

}
